import i18n from '@/i18n/i18n'
export const selectOptions = [
  {
    label: i18n.t('components.ApprovalFlow.78be0cb3e641a612186debc6a261df46'),
    value: 7
  }
]

export const checkboxOptions = [
  {
    label: i18n.t('components.ApprovalFlow.9cf308d875e2d67bbf9365eaf5371935'),
    value: 11
  },
  {
    label: i18n.t('components.ApprovalFlow.ebfd6346f9ba384f7383035f1d52c6b2'),
    value: 7
  }
]

export const numberOptions = [
  {
    label: i18n.t('components.ApprovalFlow.eff8cb878b738fe9377b4a194ef1c707'),
    value: 3
  },
  {
    label: i18n.t('components.ApprovalFlow.38eb0b1694e859fab8fe90e70e3f498e'),
    value: 2
  },
  {
    label: i18n.t('components.ApprovalFlow.9f1d1286d807fac79577de07a872f627'),
    value: 5
  },
  {
    label: i18n.t('components.ApprovalFlow.ffde1bfaa532ec280fcc1fc798805ab7'),
    value: 1
  },
  {
    label: i18n.t('components.ApprovalFlow.a8bb32ae9a7aa3893894b82d4f317be5'),
    value: 4
  },
  {
    label: i18n.t('components.ApprovalFlow.bd493095062e9f9dcfe81afebdeaa703'),
    value: 6
  }
]

export const numberValueOptions = [
  {
    label: '<',
    value: 1
  },
  {
    label: '≤',
    value: 2
  }
]

export function getOptionObj(list) {
  const obj = {}
  list.forEach((item) => {
    obj[item.value] = item.label
  })
  return obj
}
// type 连接条件 1 等于 2 大于 3 小于 4 大于等于 5 小于等于 6 两者之间 7 包含 8 员工/部门/角色 11完全等于
export function getSendObj(checked) {
  return {
    name: i18n.t('components.ApprovalFlow.479e6fa166357e5be946a0fe6ea653b4'),
    conditionType: 8,
    // 用于展示
    userList: [],
    deptList: [],
    roleList: [],
    values: {
      userList: [],
      deptList: [],
      roleList: []
    },
    checked
  }
}
